From: Olaf Hering Date: Mon, 22 Sep 2014 13:00:03 +0000 (+0200) Subject: Config.mk: add new macro buildmakevars2header X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4364 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e8a23cfad48097c5ab78c05230ccc73ac183dfad;p=xen.git Config.mk: add new macro buildmakevars2header This macro is similar to buildmakevars2file, it just creates a C header file instead of shell style syntax. Upcoming changes will use this macro in libxl and libxc. Signed-off-by: Olaf Hering Acked-by: Ian Campbell --- diff --git a/Config.mk b/Config.mk index 64982c6bff..4c3a2a7b4b 100644 --- a/Config.mk +++ b/Config.mk @@ -179,6 +179,15 @@ define buildmakevars2file-closure $(call move-if-changed,$(1).tmp,$(1)) endef +buildmakevars2header = $(eval $(call buildmakevars2header-closure,$(1))) +define buildmakevars2header-closure + $(1): .phony + rm -f $(1).tmp; \ + $(foreach var, $(BUILD_MAKE_VARS), \ + echo "#define $(var) \"$($(var))\"" >>$(1).tmp;) \ + $(call move-if-changed,$(1).tmp,$(1)) +endef + ifeq ($(debug_symbols),y) CFLAGS += -g endif